import http from '@/Util/http'
const module = {
    namespaced: true,
    state: {
        cinemalist: []
    },
    mutations: {
        setcinema(state, newcinemalist) {
            state.cinemalist = newcinemalist
        },
        clearcinema(state) {
            state.cinemalist = []
        }
    },
    actions: {
        getcinemalist(store, cityid) {
            http({
                url: `/gateway?cityId=${cityid}&ticketFlag=1&k=1855704`,
                headers: {
                    'X-Host': 'mall.film-ticket.cinema.list'
                }
            }).then(res => {
                // this.lists = res.data.data.cinemas
                // console.log(res.data)
                store.commit('setcinema', res.data.data.cinemas)
            })
        }
    }
}
export default module